<template>
	<view class="info">
		<view class="listBox">
			<view class="list" v-for="n in data" :key="data.id" @click="goInfo('pages/ConsultationRoom/details/details',n.id)">
				<view class="">
					<view class="title flex-center">
						<image :src="n.patientAvatar" mode=""></image>
						<view class="">
							<view class="name">
								{{n.patientName}} <text>{{n.patientAge}}岁</text> <text>{{data.patientSex==1?'男':'女'}}</text>
							</view>
						</view>
					</view>
					<view class="typeBox">
						<view class="flex-center mb_17">
							<view>
								预约时间：
							</view>
							<uni-dateformat :date="n.appointTime" format="yyyy-MM-dd"></uni-dateformat>
						</view>
						<view class="flex-center b_B_e">
							<view>
								预约机构：
							</view>
							{{n.hospitalName}} <text>{{n.hospitalLevelName}}</text>
							<text class="HospitalType">{{n.hospitalTypeName}}</text>
						</view>
					</view>
					<view class="btmBox flex-sp-center">
						<uni-dateformat :date="n.createTime" format="yyyy-MM-dd hh:mm"></uni-dateformat>
						<view class="flex-center">
							查看详情 <uni-icons type="right" size="16" color="#999"></uni-icons>
						</view>
					</view>
				</view>
			</view>

		</view>
	</view>
</template>

<script>
	export default {
		props: ["data"],
		name: "PatientCondition",
		data() {
			return {

			};
		},
		methods:{
			goInfo(e, id) {
				var updata = 0
				if (id) {
					uni.navigateTo({
						url: `/${e}?id=${id}&type=1`,
					})
				} else {
					uni.navigateTo({
						url: `/${e}`,
					})
				}
			},
		}
	}
</script>

<style lang="less" scoped>
	.btmBox {
		margin-top: 25rpx;
		font-weight: 500;
		font-size: 26rpx;
		color: #999999;

		image {
			width: 25rpx;
			height: 25rpx;
			margin-right: 16rpx;
		}
	}

	.b_B_e {
		padding-bottom: 20rpx;
		border-bottom: 1px solid #EEEEEE;
	}

	.info {
		.listBox {
			margin-top: 43rpx;
			padding: 0 30rpx;

			.list {
				width: 690rpx;
				min-height: 182rpx;
				background: #FFFFFF;
				border-radius: 30rpx;
				padding: 20rpx;
				box-sizing: border-box;
				display: flex;
				align-items: center;
				justify-content: space-around;
				margin-bottom: 30rpx;

				&>view {
					width: 100%;
				}

				.btmBox {
					margin-top: 25rpx;
					font-weight: 500;
					font-size: 26rpx;
					color: #999999;
				}

				.title {
					.name {
						font-weight: bold;
						font-size: 32rpx;
						color: #333333;

						text {
							font-weight: 500;
							font-size: 26rpx;
							color: #333;
							margin-left: 19rpx;
						}
					}

					image {
						width: 58rpx;
						height: 58rpx;
						margin-right: 30rpx;
						border-radius: 50%;
					}
				}






			}

			.typeBox {
				margin-top: 15rpx;
				font-weight: 500;
				font-size: 28rpx;

				&>view {
					color: #333;

					&>view {
						color: #999;
					}
				}

				text {
					display: inline-block;
					min-width: 63rpx;
					height: 33rpx;
					background: #DEF7ED;
					border-radius: 10rpx;
					font-weight: 500;
					font-size: 22rpx;
					color: #23CC88;
					text-align: center;
					line-height: 33rpx;
					margin: 0 10rpx;

				}

				.HospitalType {
					display: inline-block;
					min-width: 63rpx;
					height: 33rpx;
					background: #FDF3E1;
					border-radius: 10rpx;
					font-weight: 500;
					font-size: 22rpx;
					color: #F1AE34;
					text-align: center;
					padding: 0 8rpx;
					line-height: 33rpx;
					margin: 0 10rpx;
				}

			}
		}
	}
</style>